<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/commercial.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateEvenementTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="6">
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_nomEvenement}" for="nomEvenement" />
                    <p:inputText id="nomEvenement" required="true" value="#{evenementController.selected.nomEvenement}" title="#{bundle.CreateEvenementTitle_nomEvenement}" />
                    <p:message for="nomEvenement"/>
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_etatEvenement}" for="etatEvenement" />
                    <p:selectOneMenu id="etatEvenement" value="#{evenementController.selected.etatEvenement}" title="#{bundle.CreateEvenementTitle_etatEvenement}" >
                        <f:selectItems value="#{etatEvenementController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="etatEvenement"/>
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_categorieEvenement}" for="categorieEvenement" />
                    <p:selectOneMenu id="categorieEvenement" value="#{evenementController.selected.categorieEvenement}" title="#{bundle.CreateEvenementTitle_categorieEvenement}" >
                        <f:selectItems value="#{categorieEvenementController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="categorieEvenement"/>
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_contact}" for="contact" />
                    <p:selectOneMenu id="contact" value="#{evenementController.selected.contact}" title="#{bundle.CreateEvenementTitle_contact}" >
                        <f:selectItems value="#{contactController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="contact"/>
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_dateCreationEvenement}" for="dateCreationEvenement" />
                    <p:calendar id="dateCreationEvenement" value="#{evenementController.selected.dateCreationEvenement}" title="#{bundle.CreateEvenementTitle_dateCreationEvenement}" pattern="dd/MM/yyyy">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateCreationEvenement"/>
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_dateMajEvenement}" for="dateMajEvenement" />
                    <p:calendar id="dateMajEvenement" value="#{evenementController.selected.dateMajEvenement}" title="#{bundle.CreateEvenementTitle_dateMajEvenement}" pattern="dd/MM/yyyy">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateMajEvenement"/>
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_dateClotureEvenement}" for="dateClotureEvenement" />
                    <p:calendar id="dateClotureEvenement" value="#{evenementController.selected.dateClotureEvenement}" title="#{bundle.CreateEvenementTitle_dateClotureEvenement}" pattern="dd/MM/yyyy">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </p:calendar>
                    <p:message for="dateClotureEvenement"/>
                    <h:outputLabel value="#{bundle.CreateEvenementLabel_descriptionEvenement}" for="descriptionEvenement" />
                    <p:inputText id="descriptionEvenement" value="#{evenementController.selected.descriptionEvenement}" title="#{bundle.CreateEvenementTitle_descriptionEvenement}" />
                    <p:message for="descriptionEvenement"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{evenementController.create}" value="#{bundle.CreateEvenementSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{evenementController.prepareList}" value="#{bundle.CreateEvenementShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
